import request from '@/utils/request'
import { unionApiUrl } from '@/api/config'

export function getList(data) {
    return request({
        url: unionApiUrl + '/partyLearningEducation/getPagePartyLearningEducation',
        method: 'post',
        data
    })
}

export function getDetail(params) {
    return request({
        url: unionApiUrl + '/partyLearningEducation/getPartyLearningEducationById',
        method: 'get',
        params
    })
}

export function addData(data) {
    return request({
        url: unionApiUrl + '/partyLearningEducation/insertSelective',
        method: 'post',
        data
    })
}

export function editData(data) {
    return request({
        url: unionApiUrl + '/partyLearningEducation/updateByPrimaryKeySelective',
        method: 'post',
        data
    })
}

export function deleteData(params) {
    return request({
        url: unionApiUrl + '/partyLearningEducation/deleteByPrimaryKey',
        method: 'post',
        params
    })
}

export function getFiles(data) {
    return request({
        url: unionApiUrl + '/partyLearningEducationFile/getPagePartyLearningEducationFile',
        method: 'post',
        data
    })
}

/**
 * 通过党组织架构获取成员
 */
export function getPartyMemberByOrg(data) {
    return request({
        url: unionApiUrl + '/partyMember/getPagePartyMember',
        method: 'post',
        data
    })
}

/**
 * 获取学习人员 
 */
export function getMembers(data) {
    return request({
        url: unionApiUrl + '/partyLearningEducationPersonnel/getPagePartyLearningEducationPersonnel',
        method: 'post',
        data
    })
}

/**
 * 完成学习
 */
export function finishStudy(data) {
    return request({
        url: unionApiUrl + '/partyLearningEducation/completeLearningEducation',
        method: 'post',
        data
    })
}